<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>活动管理</title>
    <link href="{:C('WEB_URL')}Public/admin/style/base.css" rel="stylesheet" type="text/css" />
    <link href="{:C('WEB_URL')}Public/admin/style/master.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/jquery1.9.1.js"></script>
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/base.js"></script>
    <script>
        function del(id){
            if(confirm('确定要删除记录吗?')){
                var url="__URL__/del/service_id/"+id;
               // alert(url);
				$.getJSON(url,function(data){
                    if(data['status']==1){
                        $(".list > tbody").children("#J_list"+data['data']).remove();
                    }else{
                        alert(data['info']);
                    }
                })
            }
        }
    </script>
	<style type="text/css">
	.box-info{position:absolute;top:0px;bottom:0;right:0px;left:0px;border:1px solid red;background-color:rgba(144,144,145,0.5);display:none}
	.UE img{height:30px;};
	</style>
</head>
<body>
<body>
    <div id="wrapper">
        <h2>活动管理<a href="{:U('edit')}" class="but_add">添加</a></h2>
        <table class="list">
            <thead>
			<!--筛选-->
		<form action="{:U('index')}" method="post" enctype="multipart/form-data">
        
			活动名称:<input type='text' class='inputText' name='service_name' value="{$_REQUEST['service_name']}"/>
			
			<input type='submit' value='搜索' class='btnOrange'>
		</form>
                <tr>
					<th>活动ID</th>
					<th>活动名称</th>
					<th>商场名称</th>
					<th>活动logo</th>
					<th>联系方式</th>
					<th>地址</th>
					<th>操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name='list' id='vo'>
                <tr align="center" id="J_list{$vo['service_id']}">
                    <td>{$vo['service_id']}</td>
                    <td>{$vo['service_name']}</td>
                    <td>{$vo['market_name']}</td>
                    <td><?php if($vo['img']){ ?><img src ="{:C('WEB_URL')}{$vo['img']}" style="width:40px;" ><?php }else{ echo '暂无';}?></td>
                    <td>{$vo['tel']}</td>
                    <td>{$vo['address']}</td>
                    <td>
                       <!-- <empty name="_GET['id']"><a href="{:U('orderInfo',array('order_id'=>$vo['order_id']))}"  target="_self" class="edit" >查看详情</a></empty> -->
                        <a href="{:U('edit',array('service_id'=>$vo['service_id']))}" class="edit" >编辑</a>
                        <span class="del" onClick="del({$vo['service_id']})">删除</span>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <p class="hr_10"></p>
        <div class="pages">{$page} </div>
    </div>
	
	<div class='box-info'>
	</div>
<script type="text/javascript">
	  $(document).on("click","a.J_itemDel",function(){
                $(this).parent("li").remove();
            })
</script>
</body>
</html>